<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

    <script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://apps.bdimg.com/libs/bootstrap/3.3.4/js/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.min.css" />
    <link href="../../ico.ico" rel="icon" type="image/x-icon" />
    <script src="https://cdn.bootcss.com/js-sha1/0.6.0/sha1.min.js"></script>
  <script type="text/javascript">
  	$(function  () {
  		

        
        
        
       //login event    
     $('#login').on('click',function  () {
       
       if(regz()){
       	    let data={};
     	    data.phone=$('#user').val()
     	    data.password=sha1($('#password').val())
     	    data=JSON.stringify(data)
     	    let ur='/jd/login_phone?&data='+data	      
     	    ur=encodeURI(ur)
     	    location.href=ur
       }else{
       		let data={};
     	    data.user=$('#user').val()
     	    data.password=sha1($('#password').val())
     	    data=JSON.stringify(data)
     	     let ur='/jd/login_user?&data='+data      
     	    ur=encodeURI(ur)
     	    location.href=ur
       }
     
 
   	
      })//login click end！！！！    
        
        
function regz () {
		var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;  
          if (!myreg.test($('#user').val())) {  
              return false;  
          } else {  
              return true;  
          }  
}     
        
        
        
        
  	})//function edn!!!
  </script>
</head>


<body>

<div style="font-size: 30px;font-family: '方正舒体';padding-left: 400px;">
	欢迎登陆
</div>

<div style="background: url(/jd/images/later/login1.png) repeat no-repeat; background-size:100% ;height: 500px;">



			<div style="width: 300px;float: right;margin-right: 200px;margin-top: 100px;">
				<form class="bs-example bs-example-form" role="form" >
					<div class="input-group input-group-on'">
						<span class="input-group-addon">账号</span>
						<input type="text" id="user" class="form-control" placeholder="用户名/手机号">
					</div><br>
					<div class="input-group">
						<span class="input-group-addon">密码</span>
						<input id="password" type="password" class="form-control" placeholder="密码">
					</div><br>
			      <a href="#" style="text-decoration: none;color: black;">忘记密码？</a>
			      
			      <div id="myButtons2" class="bs-example" style="margin-top: 20px;">
						    <button type="button" id="login" class="btn btn-primary" 
						        data-loading-text="Loading..." style="font-size:20px;width: 300px;background: #e4393c;border: #e4393c;">登陆
						    </button>
						</div>
						<div style="text-align: right;padding: 20px;padding-right: 0px;">
							<a href="/jd/reg" style="text-decoration: none;color:#fff;font-size: 15px;">立即注册>></a>
						</div>
						
				</form>
			</div>
</div>



<% include ../foot %>

</body>
</html>